import request from '@/utils/request'

// 查询产品入库列表
export function listCprk(query) {
  return request({
    url: '/warehouse/cprk/list',
    method: 'get',
    params: query
  })
}

// 查询产品入库详细
export function getCprk(rkCode) {
  return request({
    url: '/warehouse/cprk/' + rkCode,
    method: 'get'
  })
}

// 新增产品入库
export function addCprk(data) {
  return request({
    url: '/warehouse/cprk',
    method: 'post',
    data: data
  })
}

// 修改产品入库
export function updateCprk(data) {
  return request({
    url: '/warehouse/cprk',
    method: 'put',
    data: data
  })
}


// 删除产品入库
export function delCprk(rkCode) {
  return request({
    url: '/warehouse/cprk/' + rkCode,
    method: 'delete'
  })
}

// 查询产品入库详细
export function selectCp(query) {
  return request({
    url: '/warehouse/cprk/cpList/',
    method: 'get',
    params: query
  })
}

// 审核来料入库
export function examine(llCode) {
  return request({
    url: '/warehouse/cprk/examine/' + llCode,
    method: 'post'
  })
}

// 撤销来料入库
export function cancel(llCode) {
  return request({
    url: '/warehouse/cprk/cancel/' + llCode,
    method: 'post'
  })
}
